import random


def generate_random_numbers(n):
    return [random.randint(1, 100) for _ in range(n)]


def calculate_squares(numbers):
    return [x ** 2 for x in numbers]


def main():
    n = 5
    random_numbers = generate_random_numbers(n)
    squares = calculate_squares(random_numbers)

    print("随机生成的数字:", random_numbers)
    print("对应的平方值:", squares)


if __name__ == "__main__":
    main()